{* $Id$ *}
{include_core file="admin/lib/header.html" title="快递区域展示"}
{if empty($search_filter) && empty($list) && $status != 0}
<div class="search-none search-none-bg">
  <p>还没有快递区域发布，点击<a href="{AnUrl("express/admin/add_area?express_id={$express_id}")}" class="search-none-add">添加快递区域</a></p>
</div>
{else}
<div class="page-header border-bottom clearfix">
  <h2 class="left">快递区域管理<span>在这里对快递区域进行管理</span></h2>
  <a href="{AnUrl('express/admin/index')}" class="btn btn-default btn-sm right">&lt;&nbsp;返回快递区域列表</a>
  <a href="{AnUrl("express/admin/add_area?express_id={$express_id}")}" class="btn btn-success btn-sm right"><i class="icon-add"></i>添加快递区域</a>
</div>
<!--start:列表-->
<table class="list-table">
  <caption>按状态：
    <a href='{AnUrl("express/admin/area?status=1&express_id={$express_id}")}' {if $status == 1} class="label label-primary" {else} class="label label-default" {/if}>正常</a>
    <a href='{AnUrl("express/admin/area?status=0&express_id={$express_id}")}' {if $status == 0} class="label label-primary" {else} class="label label-default" {/if}>已删除</a>
  </caption>
  <thead><tr>
    {if $status == 1}
    <th style="width:20px;"><input type="checkbox" class="selectAll"></th>
    {/if}
    <th style="width:80px;">快递区域名称</th>
    <th style="min-width:140px">运费信息</th>
    <th style="min-width:200px;">所辖地区</th>
    <th style="width:180px;">操作</th>
  </tr></thead>
  <tbody>
  {foreach $list as $k=>$v}
  <tr id="dataList{$v.id}" {if $k%2 == 1} class="bg-gray"{/if} data-id="{$v.id}">
  {if $status == 1}
  <td><input type="checkbox" class="listSelect"></td>
  {/if}
  <td>{$v.title}</td>
  <td>
    {if $v.type == 1}
    费用计算方式: <span style="color:red">按重量</span><br/>
    1000g内　　: <span style="color:red">{$v.price}元</span><br />
    1000g外　　: <span style="color:red">{$v.renew_price}Kg/元</span><br />
    {else}
    费用计算方式: <span style="color:red">按件数</span><br/>
    单件商品费用: <span style="color:red">{$v.price}元</span><br />
    {/if}
    满 <span style="color:red">{$v.free_price}</span> 元免运费
  </td>
  <td>{express_helper::get_provincial_title($v.id)}</td>
  <td>
    {if $status == 1}
    <a href="{AnUrl("express/admin/add_area?express_relation_id={$v.id}")}" class="btn btn-info btn-xs"><i class="icon-edit icon-white"></i>编辑</a>
    <a href="{AnUrl("express/admin/delete_area?express_relation_id={$v.id}")}" class="btn btn-danger btn-xs deleteOne"><i class="icon-trash icon-white"></i>删除</a>
    {elseif $status == 0}
    <a href="{AnUrl("express/admin/change_status_area?express_relation_id={$v.id}&status=1")}" class="btn btn-success btn-xs changeStatus"><i class="icon-trash icon-white"></i>恢复</a>
    {/if}
  </td>
  </tr>
  {foreachelse}
  <tr><td class="txtleft" colspan="5">暂无数据</td></tr>
  {/foreach}
  </tbody>
  {if $status == 1}
  <tfoot><tr><td><input type="checkbox" class="selectAll"></td><td colspan="4"><a href="{AnUrl("express/admin/delete_area")}" class="btn btn-danger btn-xs deleteAll">批量删除</a></td></tr></tfoot>
  {/if}
</table>
{include_core file="admin/lib/pager.html"}
{/if}
<!--end:列表-->
{include_core file="admin/lib/footer.html"}